package response

type Empty struct{}

type Body struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

const TOKENERR = 502

func (r *Body) Set(args []Body) {
	if len(args) != 0 {
		body := args[0]
		if body.Msg != "" {
			r.Msg = body.Msg
		}
		if body.Data != nil {
			r.Data = body.Data
		}
		if body.Code != 0 {
			r.Code = body.Code
		}
	}
}
